package kr.pe.johnkim.waiting.mobile.service;

import kr.pe.johnkim.waiting.mobile.dao.WaitingMerchantDao;
import kr.pe.johnkim.waiting.mobile.domain.WaitingMerchant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Waiting 가맹점 관련 service 구현 클래스 이다.
 *
 * @author : John_Kim <cale9797@gmail.com>
 * @date : 13. 5. 23.
 */
@Service
public class WaitingMerchantServiceImpl implements WaitingMerchantService {

    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(WaitingEventServiceImpl.class);

    @Autowired
    private WaitingMerchantDao waitingMerchantDao;

    /**
     * 가맹점 정보를 가져 온다.
     *
     * @param waitingMerchant
     * @return
     */
    @Override
    public WaitingMerchant selectMerchantInformation(WaitingMerchant waitingMerchant) {
        logger.info("selectMerchantInformation");
        return this.waitingMerchantDao.selectMerchantInformation(waitingMerchant);
    }

    /**
     * 가맹점 로그인을 한다.
     *
     * @param waitingMerchant
     * @return
     */
    @Override
    public WaitingMerchant login(WaitingMerchant waitingMerchant) {
        logger.info("login");
        return this.waitingMerchantDao.login(waitingMerchant);
    }
}
